package 多线程;

/**
 * Created By  醉美柳舞之众星捧月
 *
 * @author song
 * @date 2017/11/9 18:10
 */
public class PrintChar实现 implements Runnable {

    private char c;
    private int times;

    public PrintChar实现() {

    }

    public PrintChar实现(char c, int times) {
        this.c = c;
        this.times = times;
    }

    @Override
    public void run() {
        for (int i = 0; i < times; i++) {
            System.out.println(c);
            try {
                Thread.sleep(1500);
                //线程睡眠,   隔1.5s执行一遍
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
        }
    }
}
